commit 868d15dcb646e8de98a469000e58753bc529da31
Author: q66 <q66@chimera-linux.org>
Date:   Tue Oct 4 01:01:22 2022 +0200

    disable lto on riscv64

diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
index a243ee5..64d0ce0 100644
--- a/config/makefiles/rust.mk
+++ b/config/makefiles/rust.mk
@@ -89,6 +89,7 @@ ifndef MOZ_LTO_RUST_CROSS
 ifndef rustflags_sancov
 # Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045.
 ifndef MOZ_CODE_COVERAGE
+ifeq (,$(findstring riscv64,$(RUST_TARGET)))
 ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
 cargo_rustc_flags += -Clto
 endif
@@ -99,6 +100,7 @@ endif
 endif
 endif
 endif
+endif
 
 ifdef CARGO_INCREMENTAL
 export CARGO_INCREMENTAL
